package cn.edu.scau.cmi.luochenghao.chapter07;

interface A_4 {
	double f(double x,double y);
}

class B_4 implements A_4 {
	public double f(double x,double y) {
		return x*y;
	}
	int g(int a,int b) {
		return a+b;
	}
}

public class E_4 {

	public static void main(String[] args) {
		A_4 a=new B_4();
		System.out.println(a.f(3, 5));
		B_4 b=(B_4)a;
		System.out.println(b.g(3, 5));

	}

}
